package widsets;


import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class Widsets extends MIDlet
        implements Runnable {

    private aq a;

    public Widsets() {
        Display display = Display.getDisplay(this);
        ao.a();
        ao.a();
        if (ao.b()) {
            r r1 = new r(this);
            display.setCurrent(r1);
            (new Thread(r1)).start();
        }
    }

    public void startApp() {
        (new Thread(this)).start();
    }

    public void pauseApp() {
        if (a != null)
            a.c();
    }

    public void destroyApp(boolean flag) throws MIDletStateChangeException {
        if (a != null)
            a.d();
    }

    public void run() {
        if (a == null) {
            try {
                a = (aq) Class.forName("aq").newInstance();
                a.a(this);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
            }
            try {
                destroyApp(true);
            }
            catch (MIDletStateChangeException _ex) {
            }
            if (a != null)
                a.b();
        }
    }
}